<template>
	<view class="box">
		<view class="envelopeWrap">
		
		<view class="envelopeCentent appointSuccess">
			<image src="../../static/image/payFail.png"></image>
			<text class="appointSF">{{title}}</text>
			
			<view class="appointmentText">
				<view>提示:</view>
				<view>{{msg}}</view>
			</view>
		</view>
	    
		<view class="payFailBottom">
		    <view class="payFailReturn" @click="returnOrder()">
			    <text>返回订单</text>
			</view>
			
			<!-- 在线客服 -->
			<view class="payFailCurtomer" @click="call()">
				<image src="../../static/image/myHelp_11.png" mode=""></image>
				<text>在线客服</text>
			</view>
			
		</view>
		
		</view>
		<!-- 弹窗模板 -->
		<uni-pops ref="uniPops"></uni-pops>
	</view>
</template>

<script>
	import api from '../../api/index.js';
	export default {
		data() {
			return {
				title:{},//title设置信息
				msg:'',//错误信息
			}
		},
		onShow() {
			this.getOrderid()
		},
		methods: {
			// 获取title
			getOrderid() {
				var reg = new RegExp("(^|&)" + "title" + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
				var r = window.location.search.substr(1).match(reg); //匹配目标参数
				if (r != null) {
					this.title = decodeURIComponent(r[2]);
					this.getAdvanceFlag()
				} else {
					this.title = null;
				}
			},
			//获取msg
			getAdvanceFlag() {
				var reg = new RegExp("(^|&)" + "msg" + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
				var r = window.location.search.substr(1).match(reg); //匹配目标参数
				if (r != null) {
					this.msg = decodeURIComponent(r[2]);
				} else {
					this.msg = null;
				}
			},
			// 返回订单
			returnOrder(){
				uni.navigateTo({
					 url: '/pages/mineOrder/mineOrder?tabCurrentIndex=0'
				})
			},

		  // 拨打电话
		  call() {
		  	this.$refs.uniPops.show()
		  },
		}
	}
</script>

<style>
	@import url("../myMutualHelp/redEnvelopeManagement.css");
	@import url("../myMutualHelp/myMutualHelp.css");
	.appointSuccess{
		margin-top: 60rpx;
	}
	.appointSuccess .appointSF{
		font-size:30rpx!important;
		font-family:PingFang SC!important;
		font-weight:bold!important;
		color:rgba(0,0,0,1)!important;
	}
	.appointmentText{
		height:61rpx;
		font-size:24rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(153,153,153,1);
		margin-bottom: 313rpx;
		text-align: center;
		line-height: 40rpx;
	}
	.appointmentText view:last-child{
		width: 344rpx;
		text-align: center;
	}
	.payFailBottom{
		display: flex;
		flex-direction: column;
		align-items: center;
		margin-top: 440rpx;
	}
	.payFailReturn{
		width:330rpx;
		height:70rpx;
		background:rgba(242,242,242,1);
		border-radius:35rpx;
		text-align: center;
		line-height: 70rpx;
		font-size:30rpx;
		font-family:PingFang SC;
		font-weight:bold;
		color:rgba(102,191,0,1);
		margin-bottom: 60rpx;
	}
	.payFailCurtomer{
		display: flex;
		align-items: center;
	}
	.payFailCurtomer image{
		width:24rpx;
		height:24rpx;
		margin-right:9rpx ;
	}
	.payFailCurtomer text{
		font-size:24rpx;
		font-family:PingFang SC;
		font-weight:500;
		color:rgba(153,153,153,1);
	}
</style>
